<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>创建一个聊天</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="./?/file&name=base.min.css">
    <link rel="icon" href="./?/file&name=logo.png">
    {CSS}
</head>
<body>
<div class="content">
    <div class="content-heading">
        <div class="container">
            <h2 class="text-center heading">创建一个聊天</h2>
        </div>
    </div>
    <div class="container">
        <div class="form-group form-group-label">
            <h3 class="text-center content-sub-heading"><label class="floating-label" for="roomId">房间ID</label></h3>
            <input id="roomId" class="form-control avatar-red" type="text" maxlength="4" placeholder="房间ID：XXXX" autofocus="autofocus">
        </div>
        <div class="form-group">
            <div class="checkbox switch">
                <label for="enablePassword">
                    <input type="checkbox" class="access-hide" id="enablePassword"><span class="switch-toggle"></span>
                    设置密码
                </label>
            </div>
            <div id="passwordDiv" style="display: none;">
                <div class="form-group">
                    <label for="roomPassword">房间密码：</label>
                    <input type="text" id="roomPassword" class="form-control form-control-inline">
                </div>
            </div>
        </div>
        <h4 id="join-tip" class="text-center content-sub-heading">按下回车创建</h4>
        <div class="content-inner">
            <div class="text-center">
                <a class="btn btn-lg waves-button waves-effect waves-light" id="join">创建</a>&nbsp;
            </div>
        </div>
        <div class="clearfix">
            <p class="pull-left"><a href="./?/list" class="text-auto-color">去看看房间列表</a></p>
            <p class="pull-right"><a href="./?/create" class="text-auto-color">去加入一个房间</a></p>
        </div>
    </div>

    <a id="open-modal-dialog" data-toggle="modal" href="#modal-dialog"></a>
    <div aria-hidden="true" class="modal fade" id="modal-dialog" role="dialog" tabindex="-1">
        <div class="modal-dialog modal-xs">
            <div class="modal-content">
                <div class="modal-heading">
                    <a class="modal-close" data-dismiss="modal">&times;</a>
                    <h2 class="modal-title" id="modal-dialog-title"></h2>
                </div>
                <div class="modal-inner">
                    <p id="modal-dialog-message"></p>
                </div>
                <div class="modal-footer">
                    <p class="text-right">
                        <button id="dialog-button" class="btn btn-flat btn-alt" data-dismiss="modal">取消</button>
                        <button class="btn btn-flat btn-alt" data-dismiss="modal">确定</button>
                    </p>
                </div>
            </div>
        </div>
    </div>

    <div class="footer">
        <p>Developed by SCH</p>
        <p>Chat-Lite {VERSION}<br>Running with PHP {PHPVERSION}</p>
    </div>
</div>
<div>
    <button onclick="history.back();" style="position: fixed;top: 0;left: 0;z-index: 999;" class="btn btn-lg waves-button waves-effect waves-light"><span class="fa fa-arrow-left fa-2x"></span></button>
    <button id="back" onclick="window.open(`./?/`,`_self`)" style="position: fixed;top: 0;left: 84px;z-index: 999;" class="btn btn-lg waves-button waves-effect waves-light"><span class="fa fa-home fa-2x"></span></button>
    <button id="refresh" onclick="location.reload()" style="position: fixed;top: 0;left: 168px;z-index: 999;" class="btn btn-lg waves-button waves-effect waves-light"><span class="fa fa-refresh fa-2x"></span></button>
</div>
{SetColor}
<script src="./?/file&name=jquery.min.js"></script>
<script src="./?/file&name=base.min.js"></script>
<script src="./?/file&name=SetColor.js"></script>
{JS}
</body>
</html>